<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <ul id="ul1">
        <li>Lorem, ipsum.</li>
        <li>Quas, vero.</li>
        <li>Laborum, totam.</li>
        <li>Fugit, a.</li>
        <li>Beatae, ipsum.</li>
        <li>Odit, quas.</li>
        <li>Sunt, unde.</li>
        <li>Soluta, in!</li>
        <li>Blanditiis, repellat!</li>
        <li>Eius, iusto.</li>
    </ul>

    <script>
        var ul = document.getElementById("ul1");
        var frag = document.createDocumentFragment();
        for (var i = 1; i <= 100; i++) {
            var li = document.createElement("li");
            li.innerText = "选项" + i;
            frag.appendChild(li);
        }

        ul.appendChild(frag);
    </script>
</body>

</html>
